package cn.iocoder.yudao.module.alipay.dal.mysql.infoslideshowtype;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.alipay.dal.dataobject.infoslideshowtype.InfoSlideshowTypeDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.alipay.controller.admin.infoslideshowtype.vo.*;

/**
 * 轮播图分类 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface InfoSlideshowTypeMapper extends BaseMapperX<InfoSlideshowTypeDO> {

    default PageResult<InfoSlideshowTypeDO> selectPage(InfoSlideshowTypePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<InfoSlideshowTypeDO>()
                .likeIfPresent(InfoSlideshowTypeDO::getTypeName, reqVO.getTypeName())
                .eqIfPresent(InfoSlideshowTypeDO::getTypeDescribe, reqVO.getTypeDescribe())
                .eqIfPresent(InfoSlideshowTypeDO::getSort, reqVO.getSort())
                .betweenIfPresent(InfoSlideshowTypeDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(InfoSlideshowTypeDO::getId));
    }

    default List<InfoSlideshowTypeDO> selectList(InfoSlideshowTypeExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<InfoSlideshowTypeDO>()
                .likeIfPresent(InfoSlideshowTypeDO::getTypeName, reqVO.getTypeName())
                .eqIfPresent(InfoSlideshowTypeDO::getTypeDescribe, reqVO.getTypeDescribe())
                .eqIfPresent(InfoSlideshowTypeDO::getSort, reqVO.getSort())
                .betweenIfPresent(InfoSlideshowTypeDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(InfoSlideshowTypeDO::getId));
    }

}
